<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>知识库管理模块</title>
    <!--<base href="http://localhost:63342/NodeTest/"/>-->
    <link rel="stylesheet" href="../css/main.min.css">
	 <script src="config.js"></script>
    <script src="../js/main.min.js"></script>
    <script src="./select2.js"></script>
    <script src="../base/core.js"></script>
    <script src="faultEdit.js"></script>
    <script src="node-tree-view.js"></script>
    <link rel="stylesheet" href="treeview.css">
    <style>
        #faultTreeDiv div{
            border:2px solid black;
        }
        li.fault-is-subgraph{
            border:1px dotted black;
        }
    </style>
    <style media="print">
        .no-print { display: none }
        .page-next{ page-break-after: always }
    </style>
</head>
<body ng-app="myApp" ng-controller="manageController">
<div class="container-fluid">
    <div class="row">
        <form class="form-inline">
            <div class="form-group">
                <label>故障大类</label>
                <select class="form-control" data-ng-model="query.faultSuperType" data-ng-options="x.id as x.label for x in [{id:1,label:'火电'},{id:2,label:'水电'}]"></select>
            </div>
            <div class="form-group">
                <label>故障分组</label>
                <!--<select class="form-control" data-ng-model="query.faultType" data-ng-options="x for x in ['发电机','水电','锅炉','汽轮机','测试']">-->
                <select ng-if="query.faultSuperType==1" class="form-control" data-ng-model="query.faultType" data-ng-options="x for x in ['汽轮发电机','汽轮机','锅炉','测试']"></select>
                <select ng-if="query.faultSuperType==2" class="form-control" data-ng-model="query.faultType" data-ng-options="x for x in ['水轮发电机','水轮机','辅机','测试']"></select>
                <select ng-if="query.faultSuperType!=1 && query.faultSuperType!=2" class="form-control" data-ng-model="query.faultType" data-ng-options="x for x in ['汽轮发电机','水轮发电机','汽轮机','锅炉','水轮机','辅机','测试']"></select>
            </div>
            <div class="form-group">
                <label>故障模块</label>
                <select class="form-control" data-ng-model="query.faultModule" data-ng-options="x.name as x.name for x in faultModules | filter:{'category':query.faultType} "></select>
            </div>
            <div class="form-group">
                <label>故障名称</label>
                <select class="form-control" data-ng-model="query.fault" data-ng-options="('<'+fault.outId+'>'+ fault.name) for fault in faults | filter:filterOfFault | orderBy:sortByOutId"></select>
            </div>
            <div class="form-group">
                <label></label>
                <p class="form-control-static">
                    <a class="btn btn-default" href="javascript:;" ng-click="persistGraph()" >保存知识库</a>
                    <a class="btn btn-default" href="javascript:;" ng-click="persistGraphClone()" >复制当前故障</a>
                    <a class="btn btn-default" href="javascript:;" ng-click="createNewGraph()" >添加新故障</a>
                    <a class="btn btn-default" href="javascript:;" ng-click="deleteFault()" >删除当前故障</a>
                    <a class="btn btn-default" href="javascript:;" ng-click="refreshFaults()" >刷新故障列表</a>
                    <a class="btn btn-default" href="javascript:;" ng-click="nextFaults()" >下一个故障</a>
                    <a class="btn btn-default" href="javascript:;" ng-click="exportFaultAsJson()" >导出当前故障</a>
                    <a class="btn btn-default" href="javascript:;" ng-click="refacteGraph()" >重构当前故障</a>
                </p>
            </div>
        </form>
    </div>
    <div class="row">
        <div class="col-md-4">
            <div class="panel" style="height: 800px">
                <div class="panel-heading">故障树&nbsp;<a href="javascript:;" ng-click="graphTree.collapseAll()">展开所有节点</a> </div>
                <div class="panel-body treeDiv" id="treeDiv"></div>
            </div>
        </div>
        <div class="col-md-8">
            <div class="panel" style="height: 800px">
                <div class="panel-heading">节点详情</div>
                <div class="panel-body">
                    <form class="form-horizontal nodeDetail" id="nodeDetail2">

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>